home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
MONITOR
/
TXTCAP20.ARJ
/
TEXTCAP.DOC
< prev
Wrap
Text File
|
1991-12-05
|
9KB
|
207 lines
T E X T C A P 1 . 0
====================
TapirSoft Gisbert W.Selke
Dec 1991
General Overview
================
TextCap provides you with the possibility to capture text screens to
to your disk. The output is written with both text and display-attribute
bytes, so that no information is lost. However, this format is ugly to
read (or to incorporate into ordinary text); hence, a companion
programme allows to extract the plain text out of a captured file.
Basic Instructions
==================
The simplest way to run TextCap is to invoke it from the DOS command
line just like that:
textcap
TextCap will install itself in memory with default values (cf. below)
and wait for you to trigger it. You may now enter your (text mode)
application, and whenever your screen shows text you want to save, hit
the hot key, by default Ctrl-F9. TextCap will then write the text
screen, complete with attribute bytes which tell about colours and so
forth, to a file named SCN00000.TXT in the current directory, which
takes a few moments, depending on the speed of your disk.
The next time you want to save some text, press Ctrl-F9 again, and a
new file named SCN00001.TXT will be written to the current directory,
and so on.
After exiting your text application, you could view this text by, e.g.,
typing it. However, you probably won't be able to make much sense out of
the attribute bytes which alternate with the text bytes. They are there
just so that no information is lost, and so that you can use them if you
want to. For most purposes, you will want to extract the text only,
properly formatted at (by default) 80 columns per line. You do this by
typing
scn2asc < scn00000.txt > scn00000.lst
for the first of the screens captured; of course, the first parameter
can be replaced by the name of any captured file. The second name is
really arbitrary; you could have, e.g., "foo.bar" after the ">"
character, if you so wished. Just make sure it's not the same as the
name of the file you want to convert!
If, for reasons unknown, you ever have different size text screens,
TextCap will handle these as well, up to a size of 132 columns and 50
lines. In this case, however, you should inform Scn2Asc about this fact,
so that line-wrap is handled properly. You do so by mentioning the
desired number of columns per line on the command line; e.g., for
a 132-column screen,
scn2asc < scn00001.txt > scn00001.lst 132
TextCap will remain in memory until you re-boot, so you may enter your
text application (or any other one) again and again without having to
run TextCap again.
Note that the TXT files are always written to the current directory,
unless you have explicitly requested otherwise (cf. below); the number
part of the name, however, will be incremented even if you have changed
directories in the meantime. TextCap will never overwrite an existing
file, though.
Optional arguments
==================
The behaviour of TextCap may be changed on the command line by a few
optional arguments, to wit:
/? : display list of available arguments; do not install
/P<path>: Use the path given instead of the current directory. This
ensures that you'll find all your graphics dumps in one place,
even if you change directories wildly. You should use absolute
paths (i.e., as seen from the root directory) and drive
specifier, to make sure. (Don't type the angle brackets!)
/K<xxxx>: Use a different hot key specified by the 4 hex digits <xxxx>
(again, don't type the angle brackets!). The default is 4309
for Ctrl-F9. If you specify /K?, you will be prompted to hit a
key; TextCap will not install itself but show the hex number
that this key corresponds to.
/U : Uninstall TextCap, i.e., tell TextCap to remove itself from
memory. You may want to do this when you're sure you no longer
need TextCap for a while; it will return a considerable chunk
of memory to DOS and your other programmes.
As an example, if you want TextCap to write the text file to your RAM
disk E: and to trigger whenever you type Ctrl-Alt-P, you should use
textcap /pe: /k1908
Note that there are no blanks between "/p" and the path, and between
"/k" and the number.
To remove TextCap later, type
textcap /u
There is no way to change the parameters once TextCap has been started;
so, if you discover you want to change one of the parameters later, you
have to remove TextCap using the "/u" argument and install it anew.
Application Programmer's Interface (API)
========================================
TextCap has a very simple interface, if you want to call it from a
programme of yours, instead of from the DOS command line or via hot key.
First, you must install TextCap as usual; then, you can call interrupt
16h with a value of 4252h in register ax. If, on return, ax contains
5242h, then TextCap is resident; otherwise it isn't. Once you know it's
there, you can call interrupt 16h with ax=4254h to cause an immediate
screen capture - just as if you had typed the hot key.
The last thing - and a somewhat dangerous thing at that - you can do is
call interrupt 16h with ax=4253h. This requests removal of TextCap from
memory; actually, it just disables all services by returning all the
intercepted interrupts. TextCap then returns control to your programme,
with the segment at which it was loaded returned in ax. Your programme
is responsible for deallocating that memory. Also, your programme should
*not* have hooked any of the interrupts that were used by TextCap -
otherwise, havoc will ensue. To sum it up, this function call should
probably not be made by your programme, unless you know what you're
doing.
Possible Problems
=================
TextCap uses about 14 KB of main DOS memory. This should rarely be a
problem. If, however, the text application you wanted TextCap for runs
fine with TextCap in memory, but a different programme needs more memory
(say, some word processor), you can easily reclaim memory by removing
TextCap from memory as soon as you're finished capturing.
Note that, due to the design of DOS, memory is *not* freed up if another
resident utility has been loaded *after* TextCap. In this case, you
should first remove that utility and then proceed to uninstalling
TextCap.
A common conflict arises from hot key usage. If your application acts on
Ctrl-F9, you won't be able to perform this action anymore. Unles... you
tell TextCap what other hot key to use! Find a key that is not used for
any other purpose, and restart TextCap with a different hot key
assignment (cf. above). (Remember you have to uninstall TextCap if it's
already loaded!)
Restrictions
============
TextCap uses some 14 KB memory, which is noticeable. The reason is that
a complete screen (of up to 132*50 characters plus their attributes) is
stored in memory before it is written out to disk. This, in turn, is
necessitated by DOS not being re-entrant.
TextCap uses neither extended nor expanded memory. If interest warrants,
such a feature will be included in a future release... maybe.
TextCap hooks into interrupts 09h, 13h, 16h, and 21h. It is, however,
'well-behaved'; i.e, it interferes only as far as is unavoidable. This
means it will not pass along the hot key, and it also reserves int 16h
calls with ax=4252h, ax=4253h, and ax=4254h, which should be no problem
at all. - Some memory mappers report that TextCap also hooks interrupts
CFh and F0h; this seems to be an artifact, as TextCap definitely does
*not* touch these vectors that are purported to be used by DOS's BASIC
interpreter.
TextCap will handle errors during writing to disk only so-so. In
particular, a full disk leads to a partial text file that will perhaps
be unusable. Also, if you write to your disk's root directory and it
becomes full, you'll be in trouble. (This is a limitation of DOS;
use a subdirectory instead.)
Legal Stuff
===========
TextCap is a heavily hacked version of a PC Magazine Utility by name of
Capture, which dumps text screens to disk files. The original utility's
copyright remains intact; for the parts written by me, I retain the
copyright. In any case, this utility may be used and copied freely. It
also draws on HerCap, a Hercules graphics screen capture utility, which
I wrote earlier (a hacked version of Capture as well - thanks, PC
Magazine!)
In case of problems, suggestions etc., why not get in touch with me at
TapirSoft
Gisbert W.Selke
Ermekeilstr. 28
D-5300 Bonn 1
Germany